import {AppRegistry} from 'react-native';
import React, {Component} from 'react';
import {Provider} from 'react-redux';
import configureStore from './configureStore';
import {StackNavigator} from 'react-navigation'
import Main from "./app/components/main/main";
import Login from "./app/components/login/login";

const AppStack = StackNavigator({
        Main: {
            screen: Main
        },
        Login:{
          screen: Login
        }
    },

    {
        initialRoute: 'Main',
        navigationOptions:{
            headerStyle: {
                height: 0
            }
        }
    },

    {
        mode: 'modal'
    })

const store = configureStore();

export default class Root extends Component {
    render(){
        return(
            <Provider store={store}>
                <AppStack/>
            </Provider>
        )
    }
}

AppRegistry.registerComponent('SXBuy', () => Root);
